﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CatchUpTv.UI
{
    public partial class DownloadProgress : UserControl
    {
        public DownloadProgress()
        {
            InitializeComponent();
        }

        public void SetDescription(string description)
        {
            if (InvokeRequired)
            {
                Invoke(new Action<string>(SetDescription), description);
            }

            nameLabel.Text = description;
        }

        public void SetProgress(double percentage)
        {
            if (InvokeRequired)
            {
                Invoke(new Action<double>(SetProgress), percentage);
            }

            progressBar.Value = (int) (percentage * 10);
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {

        }
    }
}
